package com.aspose.cells;

import java.util.ArrayList;
import java.util.Iterator;

public class GroupShape extends Shape {
   private ArrayList a = new ArrayList();
   private zbol b;
   private int c;

   GroupShape(ShapeCollection shapes) {
      super(shapes, 0, shapes);
      this.N().i().c(513);
      this.b = new zbol();
   }

   zbol a() {
      return this.b;
   }

   void a(zbol var1) {
      this.b = var1;
   }

   int b() {
      return this.c;
   }

   void a(int var1) {
      this.c = var1;
   }

   int c() {
      int var1 = this.T() - 8;
      if (!this.isGroup()) {
         return var1;
      } else {
         if (this.a != null && this.a.size() != 0) {
            Iterator var2 = this.a.iterator();

            while(var2.hasNext()) {
               Shape var3 = (Shape)var2.next();
               if (var3.isGroup()) {
                  var1 += ((GroupShape)var3).c() + 8;
               } else {
                  var1 += var3.T();
               }
            }
         }

         return var1;
      }
   }

   public Shape get(int index) {
      return (Shape)this.a.get(index);
   }

   ArrayList d() {
      return this.a;
   }

   public Shape[] getGroupedShapes() {
      if (this.a == null) {
         return null;
      } else {
         Shape[] var1 = new Shape[this.a.size()];

         for(int var2 = 0; var2 < this.a.size(); ++var2) {
            var1[var2] = (Shape)this.a.get(var2);
         }

         return var1;
      }
   }

   void e() {
      this.a = null;
   }

   void f() {
      this.a = new ArrayList();
   }

   void a(Shape var1) {
      var1.a((Object)this);
      var1.N().i().b(true);
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
   }

   void a(GroupShape var1, CopyOptions var2) {
      super.a((Shape)var1, (CopyOptions)var2);
      if (var1.b != null) {
         this.b = new zbol();
         this.b.a(var1.b);
      }

   }
}
